package com.qk.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qk.common.PageResult;
import com.qk.dto.LogDto;
import com.qk.entity.Log;
import com.qk.mapper.LogMapper;
import com.qk.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: LogServiceImpl
 * Package: com.qk.service.impl
 * Description:
 *
 * @Author zt
 * @Create 2025/8/7 19:35
 * @Version 1.0
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements LogService {
    @Autowired
    private LogMapper logMapper;
    @Override
    public PageResult<Log> listLog(LogDto logDto) {
        Page<Log> page =logMapper.listLog(new Page<>(logDto.getPage(), logDto.getPageSize()), logDto);
        return new PageResult<>(page.getTotal(), page.getRecords());
    }
}
